package vlms.bean;

/**
 * 
 * This classes is the Data Transfer Object(Value Object) defination for the
 * entity person
 * 
 */

public class Person {
	private int personid;
	private String emailid;
	private String firstname;
	private String lastname;
	private String address;
	private String city;
	private String state;
	private String zipcode;
	private String membertype;
	private String creditcardtype;
	private String creditcardnum;
	private int creditcardcvv;
	private float fine;
	
	
	public Person() {
	}

	public Person(int personid, String emailid, String firstname,
			String lastname, String address, String city, String state,
			String zipcode, String persontype, String creditcardtype,
			String creditcardnum, int creditcardcvv) {
		this.personid = personid;
		this.emailid = emailid;
		this.firstname = firstname;
		this.lastname = lastname;
		this.address = address;
		this.city = city;
		this.state = state;
		this.zipcode = zipcode;
		this.membertype = persontype;
		this.creditcardtype = creditcardtype;
		this.creditcardnum = creditcardnum;
		this.creditcardcvv = creditcardcvv;
	}

	public Person(Person oPerson) {
		// TODO Auto-generated constructor stub
		this.personid = oPerson.personid;
		this.emailid = oPerson.emailid;
		this.firstname = oPerson.firstname;
		this.lastname = oPerson.lastname;
		this.address = oPerson.address;
		this.city = oPerson.city;
		this.state = oPerson.state;
		this.zipcode = oPerson.zipcode;
		this.membertype = oPerson.membertype;
		this.creditcardtype = oPerson.creditcardtype;
		this.creditcardnum = oPerson.creditcardnum;
		this.creditcardcvv = oPerson.creditcardcvv;
	
	}

	public void setPersonid(int personid) {
		this.personid = personid;
	}

	public int getPersonid() {
		return (personid);
	}

	public void setEmailid(String emailid) {
		this.emailid = emailid;
	}

	public String getEmailid() {
		return (emailid);
	}

	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}

	public String getFirstname() {
		return (firstname);
	}

	public void setLastname(String lastname) {
		this.lastname = lastname;
	}

	public String getLastname() {
		return (lastname);
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getAddress() {
		return (address);
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCity() {
		return (city);
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getState() {
		return (state);
	}

	public void setZipcode(String zipcode) {
		this.zipcode = zipcode;
	}

	public String getZipcode() {
		return (zipcode);
	}

	public void setMembertype(String persontype) {
		this.membertype = persontype;
	}

	public String getMembertype() {
		return (membertype);
	}

	public void setCreditcardtype(String creditcardtype) {
		this.creditcardtype = creditcardtype;
	}

	public String getCreditcardtype() {
		return (creditcardtype);
	}

	public void setCreditcardnum(String creditcardnum) {
		this.creditcardnum = creditcardnum;
	}

	public String getCreditcardnum() {
		return (creditcardnum);
	}

	public void setCreditcardcvv(int creditcardcvv) {
		this.creditcardcvv = creditcardcvv;
	}

	public int getCreditcardcvv() {
		return (creditcardcvv);
	}
	
	public void setFine(float fine) {
		this.fine = fine;
	}

	public float getFine() {
		return (fine);
	}
	
	
	@Override
	public boolean equals(Object obj) {
		Person p = (Person) obj;
		boolean result = false;
		// TODO Auto-generated method stub
		if (this == obj || this.getPersonid() == p.getPersonid())
		{
			result = true;
		}
		return result;
	}
}
